<template>
  <div class="container">

    <div class="">
      <swiper class="swiper-box" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :circular="circular">
        <div class="swiper-s" v-for="(img, index) in imgUrls" :key="index">
          <swiper-item class="swiper-item">
            <image :src="img" class="slide-image"/>
          </swiper-item>
        </div>
      </swiper>
    </div>

    <div class="btns">
      <div class="left">
        1111
      </div>
      <div class="right">
        <div class="top">
            top
        </div>
        <div class="bottom">
          bottom
        </div>
      </div>
    </div>  

    <div class="doc-title"><span>套餐</span><span class="more">查看更多</span></div>
    <div class="zan-panel" v-for="item in 5" :key="item" @click="toDetail" v-if="true">
      <div class="zan-card" >
        <div class="zan-card__thumb">
          <image class="zan-card__img"
                 src="https://img.yzcdn.cn/upload_files/2016/11/25/FpqPXlrMRjKwJs8VdTu3ZDJCj4j5.jpeg?imagediv2/2/w/200/h/200/q/90/format/jpeg"
                 mode="aspectFit"
          ></image>
        </div>
        <div class="zan-card__detail">
          <div class="zan-card__detail-row">
            <div class="zan-card__right-col">¥ 999.99</div>
            <div class="zan-card__left-col zan-ellipsis--l2">
              红烧牛肉【虚拟商品】【有库存】【有sku】
            </div>
          </div>

          <div class="zan-card__detail-row zan-c-gray-darker">
            <div class="zan-card__right-col">x2</div>
            <div class="zan-card__left-col">
              3000克 50%
            </div>
          </div>

          <div class="zan-card__detail-row zan-c-gray-darker">
            <div class="zan-card__left-col zan-c-red">已发货</div>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<script type="text/javascript">
  export default {
    data () {
      return {
        data: [1, 2, 3],
        imgUrls: [
          'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
          'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
          'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
        ],
        indicatorDots: true,
        autoplay: true,
        interval: 5000,
        circular: true
      }
    },
    mounted () {
      console.log('mounted...')
    },
    created () {
      console.log('created...')
    },
    methods: {
      toDetail () {
        console.log('test')
        wx.navigateTo({
          url: `../../pages/combo/main`
        })
      }
    }
  }
</script>
<style scoped>
  .btns {
    width:750rpx;
    display:flex;
    justify-content:space-between;
  }
  .btns .left,
  .btns .right {
    height: 300rpx;
    width: 50%;
    background-color:#00f;
  }
  .top {
    height:150rpx;
    width:100%;
    background-color:#f00;
  }
  .bottom {
    height:150rpx;
    width:100%;
    background-color:#ff0;
  }
  .more {
    color:#299558;
    font-size:28rpx;
  }
  .swiper-box {
    height:380rpx;
    width:750rpx;
  }
  .swiper-box image {
    width:100%;
  }
  .swiper-item {
    width:750rpx;
  }
</style>